package cn.wolfcode.p2p.business.domain;

import java.math.BigDecimal;
import java.text.DateFormat;
import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

import cn.wolfcode.p2p.base.domain.BaseAuditDomain;
import lombok.Getter;
import lombok.Setter;

/**
 * 提现
 * 
 * @author wolfcode
 *
 */
@Setter
@Getter
public class MoneyWithdraw extends BaseAuditDomain {

	private String accountName;// 账户名
	private String bankName;// 银行
	private String accountNumber;// 账户
	private String bankForkName;// 支行

	private BigDecimal moneyAmount;// 提现金额(总金额)
	private BigDecimal fee;// 手续费

	public String getJsonString() {
		Map<String, Object> json = new HashMap<>();
		json.put("id", id);
		json.put("username", this.applier.getUsername());
		json.put("realName", this.accountName);
		json.put("applyTime", DateFormat.getDateTimeInstance().format(applyTime));
		json.put("bankName", bankName);
		json.put("accountNumber", accountNumber);
		json.put("bankforkname", this.bankForkName);
		json.put("moneyAmount", this.moneyAmount);
		return JSONObject.toJSONString(json);
	}

}
